package com.ndp.fb.mongo.api;

import java.util.Date;
import java.util.Iterator;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.mongodb.DBObject;

/**
 * Created by jacky.cheng on 2016/6/7.
 */
public interface EcMarketingActionRecordMongoService {
    void save(JSONObject action);

    JSONObject findById(String id);

    Iterator<DBObject> findByIdAndDate(Long marketingId, Date start, Date end);
    
    void pushEcAdActionRecord(String optId,JSONObject record);
    
    void updateEcAdActionRecord(String optId,String id,JSONObject update);
    void updateEcMarketingActionRecord(String optId,JSONObject update);
    JSONObject findEcAdActionRecord(String optId,String ecActionRecordId);
    
    JSONArray getLogs(String marketingId);
}
